package cn.wizzer.app.user.modules.models.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum BizTypeEnum {
    //正负表示收\支
    WITHDRAW("提现", -10),
    WITHDRAW_REJECT("撤销提现", 10),
    RECHARGE("充值", 20),
    SUB_REBATE("下级返佣", 30),
    INVEST("投资", -40),
    // 当赛事状态异常时，回退投资金额,
    INVEST_REVERT("投资取消", 40),
    INVEST_INCOME("投资本金和收益", 50),
    SERVICE_FEE("服务费", -60),
    INVEST_RESETTLE_DEDUCT("投资重新结算扣除", -70),
    RESETTLE_PRINCIPAL_AND_INCOME("投资重新结算本金和收益", 80),
    EXCHANGE_OUT("币种兑换转出", -90),
    EXCHANGE_IN("币种兑换转入", 90),
    PURCHASE("购买商品", -100),
    PURCHASE_BACK("购买商品退还", 100),
    SEND_RED_PACKET("发送红包", -110),
    EXPIRED_RED_PACKET("红包过期", 110),
    RECEIVED_RED_PACKET("收到红包", 120),

    BALL_COIN_EXCHANGE("金币兑换", 130),

    TRIAL_FUND_GIVE_OUT("体验金发放", 140),
    TRIAL_FUND_TAKE_BACK("体验金收回", -140),
    TRIAL_FUND_EXCEED_30DAYS("体验金收回超过30天", -140);

    final public String NAME;
    final public int VALUE;


    BizTypeEnum(String name, int val) {
        NAME = name;
        VALUE = val;
    }

    public String getNAME() {
        return NAME;
    }

    public int getVALUE() {
        return VALUE;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (BizTypeEnum bizTypeEnum : BizTypeEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", bizTypeEnum.getNAME());
            map.put("val", bizTypeEnum);
            list.add(map);
        }
        return list;
    }
}


